package com.cancer.biz.auth.entity.msg;

import com.thoughtworks.xstream.XStream;

public class TextMessage {

    private String MsgType;
    private String ToUserName;
    private String FromUserName;
    private Long CreateTime;
    private String Content;
   
    public String getMsgType() {
        return MsgType;
    }


    public void setMsgType(String msgType) {
        MsgType = msgType;
    }


    public String getToUserName() {
        return ToUserName;
    }


    public void setToUserName(String toUserName) {
        ToUserName = toUserName;
    }


    public String getFromUserName() {
        return FromUserName;
    }


    public void setFromUserName(String fromUserName) {
        FromUserName = fromUserName;
    }


    public Long getCreateTime() {
        return CreateTime;
    }


    public void setCreateTime(Long createTime) {
        CreateTime = createTime;
    }


    public String getContent() {
        return Content;
    }


    public void setContent(String content) {
        Content = content;
    }


    /**
     * 文本消息转化为xml
     * 
     * @param textMessage
     * @return
     */
    public static String textMessageToXml(TextMessage textMessage) {
        XStream xstream = new XStream();
        xstream.alias("xml", textMessage.getClass());
        return xstream.toXML(textMessage);
    }
    
}
